using System;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Data;

[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
public class Service : System.Web.Services.WebService
{
    public Service () {

        //Uncomment the following line if using designed components 
        //InitializeComponent(); 
    }

    BankingBO bankBO = new BankingBO();
    [WebMethod]
    public bool CheckAccountExists(BankingEntity entity, string typeCard)
    {
        BankingEntity bank = new BankingEntity();
        bank.Owner = entity.Owner;
        bank.Code = bankBO.Card_encode_toByte(entity.Code.ToString());
        bank.ExpiredDate = entity.ExpiredDate;
        return bankBO.checkCardExists(bank, typeCard);
    }

    [WebMethod]
    public DataSet GetMasterAccountList()
    {
        DataSet ds = bankBO.getListMasterAccount();
        return ds;
    }

    [WebMethod]
    public DataSet GetVisaAccountList()
    {
        DataSet ds = bankBO.getListVisaAccount();
        return ds;
    }
    
    
}
